import request from "@/axios";
import type { UserLoginType, UserTokenModel, UserInfo } from "./types";

export const login = (
  data: UserLoginType
): Promise<IResponse<UserTokenModel>> => {
  return request.post({ url: "/user/token", data });
};

export const getUserInfo = (): Promise<IResponse<UserInfo>> => {
  return request.get({ url: "/user/info" });
};
